#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
bool is_prime(int n)
{
    for (int i = 2; i < n; i++)
    {
        if (n % i == 0)
            return false;
    }
    return true;
}
int main()
{
    int n = 0;
    cin >> n;
    int count = 0;
    for (int i = 2; i < n; i++)
    {
        if (is_prime(i))
            count++;
    }
    cout << count;
    return 0;
}